import socket
import time

client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
while True:
    if client.connect_ex(('199.9.10.138', 7777)) == 0:
        while True:
            print('请输入控制命令：')
            cmd = input()
            client.send(cmd.encode())
            rec = client.recv(1024)
            print(rec.decode())



